.class public Lcom/brixd/niceapp/community/adapter/CommunityFavAppAdapter;
.super Landroid/widget/BaseAdapter;
.source "CommunityFavAppAdapter.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/brixd/niceapp/community/adapter/CommunityFavAppAdapter$ViewHolder;
    }
.end annotation


# instance fields
.field private mContext:Landroid/content/Context;

.field private mIconOptions:Lcom/nostra13/universalimageloader/core/DisplayImageOptions;

.field private mImageLoader:Lcom/nostra13/universalimageloader/core/ImageLoader;

.field private mModels:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List",
            "<",
            "Lcom/brixd/niceapp/community/model/CommunityAppModel;",
            ">;"
        }
    .end annotation
.end field


# direct methods
.method public constructor <init>(Landroid/content/Context;Ljava/util/List;)V
    .registers 6
    .param p1, "context"    # Landroid/content/Context;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Landroid/content/Context;",
            "Ljava/util/List",
            "<",
            "Lcom/brixd/niceapp/community/model/CommunityAppModel;",
            ">;)V"
        }
    .end annotation

    .prologue
    .local p2, "models":Ljava/util/List;, "Ljava/util/List<Lcom/brixd/niceapp/community/model/CommunityAppModel;>;"
    const v2, 0x7f0200d8

    const/4 v1, 0x1

    .line 28
    invoke-direct {p0}, Landroid/widget/BaseAdapter;-><init>()V

    .line 29
    iput-object p1, p0, Lcom/brixd/niceapp/community/adapter/CommunityFavAppAdapter;->mContext:Landroid/content/Context;

    .line 30
    iput-object p2, p0, Lcom/brixd/niceapp/community/adapter/CommunityFavAppAdapter;->mModels:Ljava/util/List;

    .line 32
    invoke-static {}, Lcom/nostra13/universalimageloader/core/ImageLoader;->getInstance()Lcom/nostra13/universalimageloader/core/ImageLoader;

    move-result-object v0

    iput-object v0, p0, Lcom/brixd/niceapp/community/adapter/CommunityFavAppAdapter;->mImageLoader:Lcom/nostra13/universalimageloader/core/ImageLoader;

    .line 33
    new-instance v0, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;

    invoke-direct {v0}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;-><init>()V

    .line 34
    invoke-virtual {v0, v1}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;->resetViewBeforeLoading(Z)Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;

    move-result-object v0

    invoke-virtual {v0, v1}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;->cacheInMemory(Z)Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;

    move-result-object v0

    .line 35
    invoke-virtual {v0, v1}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;->cacheOnDisc(Z)Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;

    move-result-object v0

    sget-object v1, Lcom/nostra13/universalimageloader/core/assist/ImageScaleType;->EXACTLY:Lcom/nostra13/universalimageloader/core/assist/ImageScaleType;

    invoke-virtual {v0, v1}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;->imageScaleType(Lcom/nostra13/universalimageloader/core/assist/ImageScaleType;)Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;

    move-result-object v0

    sget-object v1, Landroid/graphics/Bitmap$Config;->RGB_565:Landroid/graphics/Bitmap$Config;

    .line 36
    invoke-virtual {v0, v1}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;->bitmapConfig(Landroid/graphics/Bitmap$Config;)Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;

    move-result-object v0

    new-instance v1, Lcom/nostra13/universalimageloader/core/display/SimpleBitmapDisplayer;

    invoke-direct {v1}, Lcom/nostra13/universalimageloader/core/display/SimpleBitmapDisplayer;-><init>()V

    .line 37
    invoke-virtual {v0, v1}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;->displayer(Lcom/nostra13/universalimageloader/core/display/BitmapDisplayer;)Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;

    move-result-object v0

    .line 38
    invoke-virtual {v0, v2}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;->showImageOnFail(I)Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;

    move-result-object v0

    .line 39
    invoke-virtual {v0, v2}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;->showImageOnLoading(I)Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;

    move-result-object v0

    .line 40
    invoke-virtual {v0, v2}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;->showImageForEmptyUri(I)Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;

    move-result-object v0

    invoke-virtual {v0}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;->build()Lcom/nostra13/universalimageloader/core/DisplayImageOptions;

    move-result-object v0

    iput-object v0, p0, Lcom/brixd/niceapp/community/adapter/CommunityFavAppAdapter;->mIconOptions:Lcom/nostra13/universalimageloader/core/DisplayImageOptions;

    .line 41
    return-void
.end method


# virtual methods
.method public getCount()I
    .registers 2

    .prologue
    .line 45
    iget-object v0, p0, Lcom/brixd/niceapp/community/adapter/CommunityFavAppAdapter;->mModels:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result v0

    return v0
.end method

.method public getItem(I)Ljava/lang/Object;
    .registers 3
    .param p1, "position"    # I

    .prologue
    .line 50
    iget-object v0, p0, Lcom/brixd/niceapp/community/adapter/CommunityFavAppAdapter;->mModels:Ljava/util/List;

    invoke-interface {v0, p1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    return-object v0
.end method

.method public getItemId(I)J
    .registers 4
    .param p1, "position"    # I

    .prologue
    .line 55
    int-to-long v0, p1

    return-wide v0
.end method

.method public getView(ILandroid/view/View;Landroid/view/ViewGroup;)Landroid/view/View;
    .registers 10
    .param p1, "position"    # I
    .param p2, "convertView"    # Landroid/view/View;
    .param p3, "parent"    # Landroid/view/ViewGroup;

    .prologue
    .line 62
    if-nez p2, :cond_e3

    .line 63
    iget-object v2, p0, Lcom/brixd/niceapp/community/adapter/CommunityFavAppAdapter;->mContext:Landroid/content/Context;

    const v3, 0x7f030028

    const/4 v4, 0x0

    invoke-static {v2, v3, v4}, Landroid/view/View;->inflate(Landroid/content/Context;ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object p2

    .line 65
    new-instance v0, Lcom/brixd/niceapp/community/adapter/CommunityFavAppAdapter$ViewHolder;

    invoke-direct {v0, p0}, Lcom/brixd/niceapp/community/adapter/CommunityFavAppAdapter$ViewHolder;-><init>(Lcom/brixd/niceapp/community/adapter/CommunityFavAppAdapter;)V

    .line 66
    .local v0, "holder":Lcom/brixd/niceapp/community/adapter/CommunityFavAppAdapter$ViewHolder;
    const v2, 0x7f0a002f

    invoke-virtual {p2, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v2

    check-cast v2, Landroid/widget/ImageView;

    iput-object v2, v0, Lcom/brixd/niceapp/community/adapter/CommunityFavAppAdapter$ViewHolder;->img:Landroid/widget/ImageView;

    .line 67
    const v2, 0x7f0a0034

    invoke-virtual {p2, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v2

    check-cast v2, Landroid/widget/TextView;

    iput-object v2, v0, Lcom/brixd/niceapp/community/adapter/CommunityFavAppAdapter$ViewHolder;->title:Landroid/widget/TextView;

    .line 68
    const v2, 0x7f0a00c3

    invoke-virtual {p2, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v2

    check-cast v2, Landroid/widget/TextView;

    iput-object v2, v0, Lcom/brixd/niceapp/community/adapter/CommunityFavAppAdapter$ViewHolder;->source:Landroid/widget/TextView;

    .line 69
    const v2, 0x7f0a0096

    invoke-virtual {p2, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v2

    check-cast v2, Landroid/widget/TextView;

    iput-object v2, v0, Lcom/brixd/niceapp/community/adapter/CommunityFavAppAdapter$ViewHolder;->upTimes:Landroid/widget/TextView;

    .line 70
    const v2, 0x7f0a00c2

    invoke-virtual {p2, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v2

    check-cast v2, Landroid/widget/TextView;

    iput-object v2, v0, Lcom/brixd/niceapp/community/adapter/CommunityFavAppAdapter$ViewHolder;->commentTimes:Landroid/widget/TextView;

    .line 72
    invoke-virtual {p2, v0}, Landroid/view/View;->setTag(Ljava/lang/Object;)V

    .line 77
    :goto_4b
    iget-object v2, p0, Lcom/brixd/niceapp/community/adapter/CommunityFavAppAdapter;->mModels:Ljava/util/List;

    invoke-interface {v2, p1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lcom/brixd/niceapp/community/model/CommunityAppModel;

    .line 78
    .local v1, "model":Lcom/brixd/niceapp/community/model/CommunityAppModel;
    iget-object v2, v0, Lcom/brixd/niceapp/community/adapter/CommunityFavAppAdapter$ViewHolder;->title:Landroid/widget/TextView;

    invoke-virtual {v1}, Lcom/brixd/niceapp/community/model/CommunityAppModel;->getTitle()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 79
    iget-object v2, v0, Lcom/brixd/niceapp/community/adapter/CommunityFavAppAdapter$ViewHolder;->source:Landroid/widget/TextView;

    invoke-virtual {v1}, Lcom/brixd/niceapp/community/model/CommunityAppModel;->getSourceTitle()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 80
    iget-object v2, v0, Lcom/brixd/niceapp/community/adapter/CommunityFavAppAdapter$ViewHolder;->upTimes:Landroid/widget/TextView;

    new-instance v3, Ljava/lang/StringBuilder;

    invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V

    const-string v4, ""

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v1}, Lcom/brixd/niceapp/community/model/CommunityAppModel;->getUpTimes()I

    move-result v4

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 81
    iget-object v2, v0, Lcom/brixd/niceapp/community/adapter/CommunityFavAppAdapter$ViewHolder;->commentTimes:Landroid/widget/TextView;

    new-instance v3, Ljava/lang/StringBuilder;

    invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V

    const-string v4, ""

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v1}, Lcom/brixd/niceapp/community/model/CommunityAppModel;->getCommentTimes()I

    move-result v4

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 83
    iget-object v2, v0, Lcom/brixd/niceapp/community/adapter/CommunityFavAppAdapter$ViewHolder;->upTimes:Landroid/widget/TextView;

    new-instance v3, Ljava/lang/StringBuilder;

    invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V

    const-string v4, "up_"

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v1}, Lcom/brixd/niceapp/community/model/CommunityAppModel;->getId()I

    move-result v4

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3}, Landroid/widget/TextView;->setTag(Ljava/lang/Object;)V

    .line 84
    iget-object v2, v0, Lcom/brixd/niceapp/community/adapter/CommunityFavAppAdapter$ViewHolder;->commentTimes:Landroid/widget/TextView;

    new-instance v3, Ljava/lang/StringBuilder;

    invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V

    const-string v4, "comment_"

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v1}, Lcom/brixd/niceapp/community/model/CommunityAppModel;->getId()I

    move-result v4

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3}, Landroid/widget/TextView;->setTag(Ljava/lang/Object;)V

    .line 86
    iget-object v2, p0, Lcom/brixd/niceapp/community/adapter/CommunityFavAppAdapter;->mImageLoader:Lcom/nostra13/universalimageloader/core/ImageLoader;

    invoke-virtual {v1}, Lcom/brixd/niceapp/community/model/CommunityAppModel;->getIconUrl()Ljava/lang/String;

    move-result-object v3

    iget-object v4, v0, Lcom/brixd/niceapp/community/adapter/CommunityFavAppAdapter$ViewHolder;->img:Landroid/widget/ImageView;

    iget-object v5, p0, Lcom/brixd/niceapp/community/adapter/CommunityFavAppAdapter;->mIconOptions:Lcom/nostra13/universalimageloader/core/DisplayImageOptions;

    invoke-virtual {v2, v3, v4, v5}, Lcom/nostra13/universalimageloader/core/ImageLoader;->displayImage(Ljava/lang/String;Landroid/widget/ImageView;Lcom/nostra13/universalimageloader/core/DisplayImageOptions;)V

    .line 88
    return-object p2

    .line 74
    .end local v0    # "holder":Lcom/brixd/niceapp/community/adapter/CommunityFavAppAdapter$ViewHolder;
    .end local v1    # "model":Lcom/brixd/niceapp/community/model/CommunityAppModel;
    :cond_e3
    invoke-virtual {p2}, Landroid/view/View;->getTag()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/brixd/niceapp/community/adapter/CommunityFavAppAdapter$ViewHolder;

    .restart local v0    # "holder":Lcom/brixd/niceapp/community/adapter/CommunityFavAppAdapter$ViewHolder;
    goto/16 :goto_4b
.end method

.method public pause()V
    .registers 2

    .prologue
    .line 98
    iget-object v0, p0, Lcom/brixd/niceapp/community/adapter/CommunityFavAppAdapter;->mImageLoader:Lcom/nostra13/universalimageloader/core/ImageLoader;

    invoke-virtual {v0}, Lcom/nostra13/universalimageloader/core/ImageLoader;->pause()V

    .line 99
    return-void
.end method

.method public resume()V
    .registers 2

    .prologue
    .line 102
    iget-object v0, p0, Lcom/brixd/niceapp/community/adapter/CommunityFavAppAdapter;->mImageLoader:Lcom/nostra13/universalimageloader/core/ImageLoader;

    invoke-virtual {v0}, Lcom/nostra13/universalimageloader/core/ImageLoader;->resume()V

    .line 103
    return-void
.end method
